﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EPanShareSystem.DbUtity;
using EPanShareSystem.Model;

namespace EPanShareSystem.BLL
{
    /// <summary>
    /// 用户管理
    /// </summary>
    public class UserManage
    {

        EFDbHelper dbHelper = new EFDbHelper();
        /// <summary>
        /// 验证用户信息
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        public Sys_User GetUserInfo(string userName, string pwd)
        {
            var userInfo = dbHelper.Find<Sys_User>(p => p.userName == userName && p.pwd == pwd);
            if (userInfo != null)
            {
                return userInfo;
            }
            return null;
        }
    }
}
